package dog.weatherwallpaper.utils;

import android.graphics.Color;

public class ComplementaryColor {
	private int argb;

	public ComplementaryColor(final int argb) {
		int alpha = Color.alpha(argb);
		int red = Color.red(argb);
		int blue = Color.blue(argb);
		int green = Color.green(argb);

		red = (~red) & 0xff;
		blue = (~blue) & 0xff;
		green = (~green) & 0xff;

		this.argb = Color.argb(alpha, red, green, blue);
	}

	/**
	 * @return alpha, red, green, blue components.
	 */
	public int getCode() {
		return argb;
	}
}